import axios from 'axios'

let base = ''

export const requestSubjects = params => {
	return axios.get(`${base}/subjects`)
	.then(res =>
		res.data
	)
}

export const requestNews = params => {
	return axios.get(`${base}/news`)
	.then(res =>
		res.data
	)
}

export const requestTypeNews = params => {
	return axios.get(`${base}/news/type`,{
		params:params
	})
	.then(res =>
		res.data
	)
}